package cn.iocoder.yudao.module.wms.dal.mysql.rdrecord01;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wms.dal.dataobject.rdrecord01.Rdrecord01DO;
import cn.iocoder.yudao.module.wms.dal.dataobject.rdrecord01.Rdrecords01DO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wms.controller.admin.rdrecord01.vo.*;

/**
 * 采购入库主 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface Rdrecord01Mapper extends BaseMapperX<Rdrecord01DO> {

    default PageResult<Rdrecord01DO> selectPage(Rdrecord01PageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<Rdrecord01DO>()
                .likeIfPresent(Rdrecord01DO::getCode, reqVO.getCode())
                .betweenIfPresent(Rdrecord01DO::getDdate, reqVO.getDdate())
                .eqIfPresent(Rdrecord01DO::getCmemo, reqVO.getCmemo())
                .betweenIfPresent(Rdrecord01DO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(Rdrecord01DO::getId)
                .eqIfPresent(Rdrecord01DO::getCpersonId, reqVO.getCpersonId())
                .eqIfPresent(Rdrecord01DO::getCdepId, reqVO.getCdepId())
                .eqIfPresent(Rdrecord01DO::getCvenId, reqVO.getCvenId())
                .eqIfPresent(Rdrecord01DO::getCwhId, reqVO.getCwhId())

        );
    }
    void updateRdrecord01Status(Rdrecord01SaveReqVO reqVO);
    Rdrecord01DO findByProcessInstanceId(String processInstanceId);
    int findCountByCode(String code);
    List<Rdrecords01RespVO> findRdrecords01ByPid(Integer pid);
    Rdrecords01RespVO findRdrecords01ById(Integer id);
}